<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.3.1.min.js"></script>
<title>Insert title here</title>
<style type="text/css">
	#left{
		margin-left: 60px;
		float: left;
	}
	#right{
		margin-left: 700px;
		margin-top: 80px;
	}
</style>
</head>
<body>
<div id="left"><img src="${pageContext.request.contextPath }/images/${showGoods.goodsPhoto}" height="450px" width="400px"></div>
<div id="right">
	<form action="${pageContext.request.contextPath}/ShopGoodsUpd" method="POST" enctype="multipart/form-data">
		<input type="hidden" name="goodsId" value="${showGoods.goodsId }"/>
		<!-- <input type="hidden" name="_method" value="PUT"> -->
		<table>
			<caption>商品基本信息</caption>
			<tr>
				<td>商品名称：</td>
				<td><input type="text" name="goodsName" value="${showGoods.goodsName }"/></td>
			</tr>
			<tr>
				<td>商品类型：</td>
				<td><input type="text" name="goodsType" value="${showGoods.goodsType }"/></td>
			</tr>
			
			<tr>
				<td>商品口味：</td>
				<td><input type="text" name="goodsTaste" value="${showGoods.goodsTaste }"/></td>
			</tr>
			<tr>
				<td>商品价格：</td>
				<td><input type="text" name="goodsPrice" value="${showGoods.goodsPrice }"/></td>
			</tr>
			<tr>
				<td>商品产地：</td>
				<td><input type="text" name="goodsAddress" value="${showGoods.goodsAddress }"/></td>
			</tr>
			<tr>
				<td>商品库存：</td>
				<td><input type="text" name="goodsStock" value="${showGoods.goodsStock }"/></td>
			</tr>
<%-- 			<tr>
				<td>生产日期：</td>
				<td><input type="text" name="goodsDate" value="<fmt:formatDate value="${showGoods.goodsDate }" pattern="yyyy-MM-dd"/>"/></td>
			</tr> --%>
			<tr>
				<td>保质期：</td>
				<td><input type="text" name="goodsLife" value="${showGoods.goodsLife }"/></td>
			</tr>
			<tr>
				<td>净含量：</td>
				<td><input type="text" name="goodsWeigth" value="${showGoods.goodsWeigth }"/></td>
			</tr>
			<tr>
				<td>邮费：</td>
				<td><input type="text" name="goodsPostage" value="${showGoods.goodsPostage }"/></td>
			</tr>
			<tr>
				<td>食用方法：</td>
				<td><input type="text" name="goodsDirection" value="${showGoods.goodsDirection }"/></td>
			</tr>
			<tr>
				<td>储存方法：</td>
				<td><input type="text" name="goodsStore" value="${showGoods.goodsStore }" style="width:200px; height:20px" /></td>
			</tr>
			<tr>
				<td>商品图片更新上传：</td>
				<td><input type="file" name="file"/></td>
			</tr>
			<tr>
				<td align="center" colspan="2"><input type="submit" value="修改"/></td>
			</tr>
	 	</table>
	</form>
</div>
</body>
</html>